selectionmodel: Rename "exclusive" to "unselect_rest"
authorBenjamin Otte <otte@redhat.com>
Mon, 8 Jun 2020 16:26:48 +0000 (18:26 +0200)
committerBenjamin Otte <otte@redhat.com>
Mon, 8 Jun 2020 16:26:48 +0000 (18:26 +0200)
The name is better at explaining what this boolean is meant to do.

gtk/gtkselectionmodel.c
gtk/gtkselectionmodel.h

index 9deb1e32de8d0b5be7d61fe8f8ea376d8736d8b2..c2edaa2a510ee159a8b3b51cb911b1b601bbed85 100644 (file)
@@ -85,7 +85,7 @@ gtk_selection_model_default_is_selected (GtkSelectionModel *model,
 static gboolean
 gtk_selection_model_default_select_item (GtkSelectionModel *model,
                                          guint              position,
-                                         gboolean           exclusive)
+                                         gboolean           unselect_rest)
 {
   return FALSE;
 }
@@ -100,7 +100,7 @@ static gboolean
 gtk_selection_model_default_select_range (GtkSelectionModel *model,
                                           guint              position,
                                           guint              n_items,
-                                          gboolean           exclusive)
+                                          gboolean           unselect_rest)
 {
   return FALSE;
 }
@@ -228,21 +228,21 @@ gtk_selection_model_is_selected (GtkSelectionModel *model,
  * gtk_selection_model_select_item:
  * @model: a #GtkSelectionModel
  * @position: the position of the item to select
- * @exclusive: whether previously selected items should be unselected
+ * @unselect_rest: whether previously selected items should be unselected
  *
  * Requests to select an item in the model.
  */
 gboolean
 gtk_selection_model_select_item (GtkSelectionModel *model,
                                  guint              position,
-                                 gboolean           exclusive)
+                                 gboolean           unselect_rest)
 {
   GtkSelectionModelInterface *iface;
 
   g_return_val_if_fail (GTK_IS_SELECTION_MODEL (model), 0);
 
   iface = GTK_SELECTION_MODEL_GET_IFACE (model);
-  return iface->select_item (model, position, exclusive);
+  return iface->select_item (model, position, unselect_rest);
 }
 
 /**
@@ -269,7 +269,7 @@ gtk_selection_model_unselect_item (GtkSelectionModel *model,
  * @model: a #GtkSelectionModel
  * @position: the first item to select
  * @n_items: the number of items to select
- * @exclusive: whether previously selected items should be unselected
+ * @unselect_rest: whether previously selected items should be unselected
  *
  * Requests to select a range of items in the model.
  */
@@ -277,14 +277,14 @@ gboolean
 gtk_selection_model_select_range (GtkSelectionModel *model,
                                   guint              position,
                                   guint              n_items,
-                                  gboolean           exclusive)
+                                  gboolean           unselect_rest)
 {
   GtkSelectionModelInterface *iface;
 
   g_return_val_if_fail (GTK_IS_SELECTION_MODEL (model), 0);
 
   iface = GTK_SELECTION_MODEL_GET_IFACE (model);
-  return iface->select_range (model, position, n_items, exclusive);
+  return iface->select_range (model, position, n_items, unselect_rest);
 }
 
 /**
index 86657fba1553a93ae698f849b25c780d2dcc5fb1..9a93a6a399604f2c4b27485be0130e67bf764935 100644 (file)
@@ -97,13 +97,13 @@ struct _GtkSelectionModelInterface
 
   gboolean              (* select_item)                         (GtkSelectionModel      *model,
                                                                  guint                   position,
-                                                                 gboolean                exclusive);
+                                                                 gboolean                unselect_rest);
   gboolean              (* unselect_item)                       (GtkSelectionModel      *model,
                                                                  guint                   position);
   gboolean              (* select_range)                        (GtkSelectionModel      *model,
                                                                  guint                   position,
                                                                  guint                   n_items,
-                                                                 gboolean                exclusive);
+                                                                 gboolean                unselect_rest);
   gboolean              (* unselect_range)                      (GtkSelectionModel      *model,
                                                                  guint                   position,
                                                                  guint                   n_items);
@@ -129,7 +129,7 @@ gboolean                gtk_selection_model_is_selected         (GtkSelectionMod
 GDK_AVAILABLE_IN_ALL
 gboolean                gtk_selection_model_select_item         (GtkSelectionModel      *model,
                                                                  guint                   position,
-                                                                 gboolean                exclusive);
+                                                                 gboolean                unselect_rest);
 GDK_AVAILABLE_IN_ALL
 gboolean                gtk_selection_model_unselect_item       (GtkSelectionModel      *model,
                                                                  guint                   position);
@@ -137,7 +137,7 @@ GDK_AVAILABLE_IN_ALL
 gboolean                gtk_selection_model_select_range        (GtkSelectionModel      *model,
                                                                  guint                   position,
                                                                  guint                   n_items,
-                                                                 gboolean                exclusive);
+                                                                 gboolean                unselect_rest);
 GDK_AVAILABLE_IN_ALL
 gboolean                gtk_selection_model_unselect_range      (GtkSelectionModel      *model,
                                                                  guint                   position,